/*


 */

package bankserver;

import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.UnknownHostException;
import java.rmi.Naming;
import java.rmi.RMISecurityManager;
import java.rmi.RemoteException;

/**
 *
 *
 */
public class BankDriver {
    public static void main(String[] args) throws RemoteException, MalformedURLException, UnknownHostException  {
        System.setSecurityManager(new RMISecurityManager());
        		
	String port = "1099";
	Bank bankServer = new BankServer();   
        String ia = InetAddress.getLocalHost().getCanonicalHostName();
        ia += ":"+ port;
        System.out.println("Starting Server at " + ia);
	Naming.rebind("//" + ia + "/BankOfDoom", bankServer);
        System.out.println("Server located at: //" + ia + "/BankOfDoom");
    }
    
}
